import { http } from "@/utils/http"
import {ListResult, ObjectResult} from "@/types/apiTypes";


export function getUserListApi(params?: any): Promise<ListResult> {
  return http.request({
    url: "/chat/getUserList",
    method: "get",
    params
  });
}

export function getUserMapApi(params?: any): Promise<ListResult> {
  return http.request({
    url: "/chat/getUserMap",
    method: "get",
    params
  });
}

export function checkFileApi(params?: any): Promise<ObjectResult> {
  return http.request({
    url: "/upload/checkFile",
    method: "get",
    params
  });
}

export function uploadFileApi(data?: FormData): Promise<ObjectResult> {
  return http.request({
    url: "/upload/uploadFile",
    method: "post",
    data
  });
}

export function uploadChunkFileApi(data?: object): Promise<ObjectResult> {
  return http.request({
    url: "/upload/uploadChunkFile",
    method: "post",
    data
  });
}


export function mergeFileApi(data?: object): Promise<ObjectResult> {
  return http.request({
    url: "/upload/mergeFile",
    method: "post",
    data
  });
}
